import request from '@/config/axios'

export interface ProjectVO {
  code?: string
  name?: string,
  expPurpose?: string,
  expRequest?: string,
  expContent?: string,
}

// 查询项目列表
export const getProjectPage = (data: PageParam) => {
  return request.post({url: '/laboratory/project/query', data})
}
export const getClassPage = () => {
  return request.get({url: '/laboratory/project/select'})
}
// 查询项目
export const getProject = (id: number) => {
  return request.get({url: '/laboratory/project/queryById/' + id})
}

// 添加项目
export const addProject = async (data: ProjectVO) => {
  return await request.post({url: '/laboratory/project/add', data})
}

// 删除项目
export const deleteProject = async (data: any) => {
  return await request.delete({url: '/laboratory/project/delete', data})
}

// 修改项目
export const updateProject = async (data: ProjectVO) => {
  return await request.put({url: '/laboratory/project/edit', data})
}
// 修改项目
export const publishProject = async (data: any) => {
  return await request.post({url: `/laboratory/project/publish`, data})
}



